package com.ctbu.yyx.cameracontrol.repository;

import com.ctbu.yyx.cameracontrol.domain.User;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface UserRepository extends JpaRepository<User,Integer> {

    /**
     * 按用户名和密码查询
     * @param userName
     * @param userPassword
     * @return
     */
    List<User> findByUserNameAndUserPassword(String userName, String userPassword);

    /**
     * 按用户名查询
     * @param userName
     * @return
     */
    List<User> findByUserName(String userName);




}
